import { buildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
  // 获取车辆列表
  getCarList: {
    url: '/api/v1/work/car',
    method: 'get'
  },
  // 新增车辆
  createCar: {
    url: '/api/v1/work/car',
    method: 'post'
  },
  // 修改车辆
  updateCar: {
    url: '/api/v1/work/car',
    method: 'put',
    type: 'restful'
  },
  // 删除车辆
  deleteCar: {
    url: '/api/v1/work/car',
    method: 'delete',
    type: 'restful'
  },
  // 获取车辆类型
  getCarType: {
    url: '/api/v1/work/car_type',
    method: 'get'
  }
}

export default buildService(settings)
